import { FormItem } from '@/components/Form/types'
import { useI18n } from 'vue-i18n'

function usePlacehoder({ placeholderId, disabled }: FormItem, defaultPlaceholderId: string) {
  const { t } = useI18n()
  if (placeholderId) return t(placeholderId)
  if (disabled) return t('lang.placeholder.defaultSys')
  return t(defaultPlaceholderId)
}

export default usePlacehoder
